<%--
  Created by IntelliJ IDEA.
  User: Efim Matytsin
  Date: 18.02.15
  Time: 5:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"  language="java" %>
<%@ include file="../../resources/templates/material/header.jsp" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<div class="container">
    <div class="section">
        <h5>Регистрация</h5>
        <p>Все поля язвляются обязательными к заполнению!</p>
        <div class="row">
            <form:form class="col s12" action="/registration/new" commandName="userData" enctype="multipart/form-data" method="post">
                <div class="row">
                    <div class="input-field col s6">
                        <form:input path="firstName" id="first_name" type="text" name="firstName" value="${userData.firstName}" class="validate"></form:input>
                        <form:errors path="firstName" cssClass="error" element="div" />
                        <label for="first_name">Имя</label>
                    </div>
                    <div class="input-field col s6">
                        <form:input path="lastName" id="last_name" type="text" name="lastName" value="${userData.lastName}" class="validate"></form:input>
                        <form:errors path="lastName" cssClass="error" element="div" />
                        <label for="last_name">Фамилия</label>
                    </div>
                </div>
                <div class="row">
                    <div class="file-field input-field">
                        <form:input path="fileName" class="file-path validate" name="fileName" value="${userData.fileName}" type="text"></form:input>
                        <form:errors path="fileName" cssClass="error" element="div" />
                        <div class="btn">
                            <span>Фото</span>
                            <form:input path="file" type="file" name="file" value="${userData.file}" ></form:input>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12">
                        <form:input path="username" id="username" type="text" name="username" value="${userDatal.username}" class="validate"></form:input>
                        <form:errors path="username" cssClass="error" element="div" />
                        <label for="username">Логин</label>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12">
                        <form:input path="password" id="password" type="password" name="password" value="${userData.password}" class="validate"></form:input>
                        <form:errors path="password" cssClass="error" element="div" />
                        <label for="password">Пароль</label>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12">
                        <form:input path="email" id="email" type="email" name="email" value="${userData.email}" class="validate"></form:input>
                        <label for="email">Почта</label>
                    </div>
                </div>

                <div class="row">
                    <button class="btn waves-effect waves-light" type="submit" name="action">Зарегистрироваться
                        <i class="mdi-content-send right"></i>
                    </button>
                </div>
            </form:form>
        </div>
    </div>
</div>

<%@ include file="../../resources/templates/material/footer.jsp" %>